/* 
 * Enterprise Library Extensions - DI + ORM.
 * Copyright (C) 2006
 *
 * GNU General Public License
 *
 * This program is free software; you can redistribute 
 * it and/or modify it under the terms of the GNU General Public License 
 * as published by the Free Software Foundation; either version 2 of the 
 * License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful, but 
 * WITHOUT ANY WARRANTY; without even the implied warranty of 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
 * See the GNU General Public License for more details.
 */
using System;
using System.Collections;

namespace ELE.EnterpriseLibrary.Naming
{
	/// <summary>
	/// This exception is thrown to indicate that the operation reached a point in the name where 
	/// the operation cannot proceed any further. When performing an operation on a composite name, 
	/// a naming service provider may reach a part of the name that does not belong to its namespace. 
	/// At that point, it can construct a CannotProceedException and then invoke methods provided by 
	/// ELE.EnterpriseLibrary.Naming.Spi.NamingManager (such as GetContinuationContext()) to locate another 
	/// provider to continue the operation. If this is not possible, this exception is raised to the 
	/// caller of the context operation. 
	/// </summary>
	public class CannotProceedException : NamingException
	{
    /// <summary>
    /// Contains the name of the resolved object, relative to the context altNameCtx. 
    /// </summary>
    protected  IName altName ;
    /// <summary>
    /// Contains the context relative to which altName is specified. 
    /// </summary>
    protected  INamingContext altNameCtx;
    /// <summary>
    /// Contains the environment relevant for the Context or DirContext method that cannot proceed. 
    /// </summary>
    protected  Hashtable environment; 
    /// <summary>
    /// Contains the remaining unresolved part of the second "name" argument to Context.rename(). 
    /// </summary>
    protected  IName remainingNewName;
    /// <summary>
    /// Constructs a new instance of CannotProceedException. All fields default to null.
    /// </summary>
    public CannotProceedException() : base()
		{
		}
    /// <summary>
    /// Constructs a new instance of CannotProceedException using an explanation. All unspecified fields default to null.
    /// </summary>
    /// <param name="explanation">A possibly null string containing additional detail about this exception. If null, this exception has no detail message</param>
    public CannotProceedException(string explanation):base(explanation)
    {
    }
    /// <summary>
    /// 
    /// </summary>
    public IName AltName
    {
      get { return altName; }
      set { altName = value; }
    }
    /// <summary>
    /// 
    /// </summary>
    public INamingContext AltNameCxt
    {
      get { return altNameCtx; }
      set { altNameCtx = value; }
    }
    /// <summary>
    /// 
    /// </summary>
    public Hashtable Environment
    {
      get {  return environment; }
      set { environment = value; }
    }
	}
}
